package JLB_Chapter_05;
// StringStartWith2
public class code_05_10 {
    public static void main(String[] args) {
        String str = "窗前明月光，疑是地上霜。";
        System.out.println("《静夜思》\n" + str + "\n");
        int enterIndex = str.indexOf("\n");
        boolean flag = str.startsWith("举",enterIndex + 1);
        if(flag) {
            System.out.println("第二行是以\"举\"开头的。");
        } else {
            System.out.println("第二行是以" + str.charAt(enterIndex + 1) + "开头的。");
        }
    }
}
